package com.mj.haier.calc.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import javax.validation.constraints.*;

import org.springframework.data.elasticsearch.annotations.Document;
import java.io.Serializable;
import java.time.Instant;
import java.util.Objects;

/**
 * The AzFinSettleBill entity.
 * 安装单结算明细， 分42张分表
 * @author ycm
 */
@ApiModel(description = "The AzFinSettleBill entity. 安装单结算明细， 分42张分表 @author ycm")
@Entity
@Table(name = "az_fin_settle_bill")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "azfinsettlebill")
public class AzFinSettleBill implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    private Long id;

    /**
     * 结算单号
     */
    @NotNull
    @ApiModelProperty(value = "结算单号", required = true)
    @Column(name = "settle_id", nullable = false, unique = true)
    private String settleId;

    /**
     * 结算批次号
     */
    @NotNull
    @ApiModelProperty(value = "结算批次号", required = true)
    @Column(name = "settle_batch_id", nullable = false)
    private String settleBatchId;

    /**
     * 安装单订单号
     */
    @ApiModelProperty(value = "安装单订单号")
    @Column(name = "order_code")
    private String orderCode;

    /**
     * 安装单结算类型， 车队1，车辆0
     */
    @ApiModelProperty(value = "安装单结算类型， 车队1，车辆0", required = true)
    @Column(name = "settle_item", nullable = false)
    private String settleItem;

    /**
     * 工贸编码，分表键
     */
    @NotNull
    @ApiModelProperty(value = "工贸编码，分表键", required = true)
    @Column(name = "trade_code", nullable = false)
    private String tradeCode;

    /**
     * 结算对象id
     */
    @ApiModelProperty(value = "结算对象id")
    @Column(name = "settle_object_id")
    private String settleObjectId;

    /**
     * 结算对象手机号
     */
    @ApiModelProperty(value = "结算对象手机号")
    @Column(name = "settle_object_tel")
    private String settleObjectTel;

    /**
     * 网点id
     */
    @ApiModelProperty(value = "网点id")
    @Column(name = "cars_team_id")
    private String carsTeamId;

    /**
     * 网点名称
     */
    @ApiModelProperty(value = "网点名称")
    @Column(name = "cars_team_name")
    private String carsTeamName;

    /**
     * 产品大类编码
     */
    @ApiModelProperty(value = "产品大类编码")
    @Column(name = "product_no")
    private String productNo;

    /**
     * 产品大类名称
     */
    @ApiModelProperty(value = "产品大类名称")
    @Column(name = "product_name")
    private String productName;

    /**
     * 产品型号编码
     */
    @ApiModelProperty(value = "产品型号编码")
    @Column(name = "product_model_no")
    private String productModelNo;

    /**
     * 产品型号名称
     */
    @ApiModelProperty(value = "产品型号名称")
    @Column(name = "product_model_name")
    private String productModelName;

    /**
     * 产品系列编码
     */
    @ApiModelProperty(value = "产品系列编码")
    @Column(name = "product_ser_no")
    private String productSerNo;

    /**
     * 产品系列描述
     */
    @ApiModelProperty(value = "产品系列描述")
    @Column(name = "product_ser_desc")
    private String productSerDesc;

    /**
     * 项目编码
     */
    @ApiModelProperty(value = "项目编码")
    @Column(name = "source_name_code")
    private String sourceNameCode;

    /**
     * 项目编码名称
     */
    @ApiModelProperty(value = "项目编码名称")
    @Column(name = "source_name")
    private String sourceName;

    /**
     * 海尔结单状态
     */
    @ApiModelProperty(value = "海尔结单状态")
    @Column(name = "haier_close_status")
    private String haierCloseStatus;

    /**
     * 海尔结单时间
     */
    @ApiModelProperty(value = "海尔结单时间")
    @Column(name = "haier_close_time")
    private Instant haierCloseTime;

    /**
     * 网点结单状态
     */
    @ApiModelProperty(value = "网点结单状态")
    @Column(name = "server_close_status")
    private String serverCloseStatus;

    /**
     * 网点结单时间
     */
    @ApiModelProperty(value = "网点结单时间")
    @Column(name = "server_close_time")
    private Instant serverCloseTime;

    /**
     * 结算操作费, 按分成比计算
     */
    @ApiModelProperty(value = "结算操作费, 按分成比计算")
    @Column(name = "settle_operate_cost")
    private String settleOperateCost;

    /**
     * 结算服务方式费, 按分成比计算
     */
    @ApiModelProperty(value = "结算服务方式费, 按分成比计算")
    @Column(name = "settle_service_type_cost")
    private String settleServiceTypeCost;

    /**
     * 结算交通费, 按分成比计算
     */
    @ApiModelProperty(value = "结算交通费, 按分成比计算")
    @Column(name = "settle_traffic_cost")
    private String settleTrafficCost;

    /**
     * 结算材料费, 按分成比计算
     */
    @ApiModelProperty(value = "结算材料费, 按分成比计算")
    @Column(name = "settle_meterial_cost")
    private String settleMeterialCost;

    /**
     * 结算超长补贴费, 按分成比计算
     */
    @ApiModelProperty(value = "结算超长补贴费, 按分成比计算")
    @Column(name = "settle_subidy_cost")
    private String settleSubidyCost;

    /**
     * 结算补偿费, 按分成比计算
     */
    @ApiModelProperty(value = "结算补偿费, 按分成比计算")
    @Column(name = "settle_compensatory_cost")
    private String settleCompensatoryCost;

    /**
     * 结算服务奖惩费, 按分成比计算
     */
    @ApiModelProperty(value = "结算服务奖惩费, 按分成比计算")
    @Column(name = "settle_reward_cost")
    private String settleRewardCost;

    /**
     * 结算费用合计, 按分成比计算
     */
    @ApiModelProperty(value = "结算费用合计, 按分成比计算")
    @Column(name = "settle_fee_total_cost")
    private String settleFeeTotalCost;

    /**
     * 法人公司代码
     */
    @ApiModelProperty(value = "法人公司代码")
    @Column(name = "company_code")
    private String companyCode;

    /**
     * 三级小微
     */
    @ApiModelProperty(value = "三级小微")
    @Column(name = "last_level")
    private String lastLevel;

    /**
     * 三级小微名称
     */
    @ApiModelProperty(value = "三级小微名称")
    @Column(name = "last_level_name")
    private String lastLevelName;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Column(name = "remark")
    private String remark;

    @Column(name = "gmt_modified")
    private Instant gmtModified;

    @Column(name = "modified_user")
    private String modifiedUser;

    @Column(name = "gmt_create")
    private Instant gmtCreate;

    @Column(name = "create_user")
    private String createUser;

    /**
     * 备用字段 add1
     */
    @ApiModelProperty(value = "备用字段 add1")
    @Column(name = "add_1")
    private String add1;

    /**
     * 备用字段 add2
     */
    @ApiModelProperty(value = "备用字段 add2")
    @Column(name = "add_2")
    private String add2;

    /**
     * 备用字段 add3
     */
    @ApiModelProperty(value = "备用字段 add3")
    @Column(name = "add_3")
    private String add3;

    /**
     * 备用字段 add4
     */
    @ApiModelProperty(value = "备用字段 add4")
    @Column(name = "add_4")
    private String add4;

    /**
     * 备用字段 add5
     */
    @ApiModelProperty(value = "备用字段 add5")
    @Column(name = "add_5")
    private String add5;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public AzFinSettleBill id(Long id){
        this.id = id;
        return this;
    }

    public String getSettleId() {
        return settleId;
    }

    public AzFinSettleBill settleId(String settleId) {
        this.settleId = settleId;
        return this;
    }

    public void setSettleId(String settleId) {
        this.settleId = settleId;
    }

    public String getSettleBatchId() {
        return settleBatchId;
    }

    public AzFinSettleBill settleBatchId(String settleBatchId) {
        this.settleBatchId = settleBatchId;
        return this;
    }

    public void setSettleBatchId(String settleBatchId) {
        this.settleBatchId = settleBatchId;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public AzFinSettleBill orderCode(String orderCode) {
        this.orderCode = orderCode;
        return this;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getSettleItem() {
        return settleItem;
    }

    public AzFinSettleBill settleItem(String settleItem) {
        this.settleItem = settleItem;
        return this;
    }

    public void setSettleItem(String settleItem) {
        this.settleItem = settleItem;
    }

    public String getTradeCode() {
        return tradeCode;
    }

    public AzFinSettleBill tradeCode(String tradeCode) {
        this.tradeCode = tradeCode;
        return this;
    }

    public void setTradeCode(String tradeCode) {
        this.tradeCode = tradeCode;
    }

    public String getSettleObjectId() {
        return settleObjectId;
    }

    public AzFinSettleBill settleObjectId(String settleObjectId) {
        this.settleObjectId = settleObjectId;
        return this;
    }

    public void setSettleObjectId(String settleObjectId) {
        this.settleObjectId = settleObjectId;
    }

    public String getSettleObjectTel() {
        return settleObjectTel;
    }

    public AzFinSettleBill settleObjectTel(String settleObjectTel) {
        this.settleObjectTel = settleObjectTel;
        return this;
    }

    public void setSettleObjectTel(String settleObjectTel) {
        this.settleObjectTel = settleObjectTel;
    }

    public String getCarsTeamId() {
        return carsTeamId;
    }

    public AzFinSettleBill carsTeamId(String carsTeamId) {
        this.carsTeamId = carsTeamId;
        return this;
    }

    public void setCarsTeamId(String carsTeamId) {
        this.carsTeamId = carsTeamId;
    }

    public String getCarsTeamName() {
        return carsTeamName;
    }

    public AzFinSettleBill carsTeamName(String carsTeamName) {
        this.carsTeamName = carsTeamName;
        return this;
    }

    public void setCarsTeamName(String carsTeamName) {
        this.carsTeamName = carsTeamName;
    }

    public String getProductNo() {
        return productNo;
    }

    public AzFinSettleBill productNo(String productNo) {
        this.productNo = productNo;
        return this;
    }

    public void setProductNo(String productNo) {
        this.productNo = productNo;
    }

    public String getProductName() {
        return productName;
    }

    public AzFinSettleBill productName(String productName) {
        this.productName = productName;
        return this;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductModelNo() {
        return productModelNo;
    }

    public AzFinSettleBill productModelNo(String productModelNo) {
        this.productModelNo = productModelNo;
        return this;
    }

    public void setProductModelNo(String productModelNo) {
        this.productModelNo = productModelNo;
    }

    public String getProductModelName() {
        return productModelName;
    }

    public AzFinSettleBill productModelName(String productModelName) {
        this.productModelName = productModelName;
        return this;
    }

    public void setProductModelName(String productModelName) {
        this.productModelName = productModelName;
    }

    public String getProductSerNo() {
        return productSerNo;
    }

    public AzFinSettleBill productSerNo(String productSerNo) {
        this.productSerNo = productSerNo;
        return this;
    }

    public void setProductSerNo(String productSerNo) {
        this.productSerNo = productSerNo;
    }

    public String getProductSerDesc() {
        return productSerDesc;
    }

    public AzFinSettleBill productSerDesc(String productSerDesc) {
        this.productSerDesc = productSerDesc;
        return this;
    }

    public void setProductSerDesc(String productSerDesc) {
        this.productSerDesc = productSerDesc;
    }

    public String getSourceNameCode() {
        return sourceNameCode;
    }

    public AzFinSettleBill sourceNameCode(String sourceNameCode) {
        this.sourceNameCode = sourceNameCode;
        return this;
    }

    public void setSourceNameCode(String sourceNameCode) {
        this.sourceNameCode = sourceNameCode;
    }

    public String getSourceName() {
        return sourceName;
    }

    public AzFinSettleBill sourceName(String sourceName) {
        this.sourceName = sourceName;
        return this;
    }

    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    public String getHaierCloseStatus() {
        return haierCloseStatus;
    }

    public AzFinSettleBill haierCloseStatus(String haierCloseStatus) {
        this.haierCloseStatus = haierCloseStatus;
        return this;
    }

    public void setHaierCloseStatus(String haierCloseStatus) {
        this.haierCloseStatus = haierCloseStatus;
    }

    public Instant getHaierCloseTime() {
        return haierCloseTime;
    }

    public AzFinSettleBill haierCloseTime(Instant haierCloseTime) {
        this.haierCloseTime = haierCloseTime;
        return this;
    }

    public void setHaierCloseTime(Instant haierCloseTime) {
        this.haierCloseTime = haierCloseTime;
    }

    public String getServerCloseStatus() {
        return serverCloseStatus;
    }

    public AzFinSettleBill serverCloseStatus(String serverCloseStatus) {
        this.serverCloseStatus = serverCloseStatus;
        return this;
    }

    public void setServerCloseStatus(String serverCloseStatus) {
        this.serverCloseStatus = serverCloseStatus;
    }

    public Instant getServerCloseTime() {
        return serverCloseTime;
    }

    public AzFinSettleBill serverCloseTime(Instant serverCloseTime) {
        this.serverCloseTime = serverCloseTime;
        return this;
    }

    public void setServerCloseTime(Instant serverCloseTime) {
        this.serverCloseTime = serverCloseTime;
    }

    public String getSettleOperateCost() {
        return settleOperateCost;
    }

    public AzFinSettleBill settleOperateCost(String settleOperateCost) {
        this.settleOperateCost = settleOperateCost;
        return this;
    }

    public void setSettleOperateCost(String settleOperateCost) {
        this.settleOperateCost = settleOperateCost;
    }

    public String getSettleServiceTypeCost() {
        return settleServiceTypeCost;
    }

    public AzFinSettleBill settleServiceTypeCost(String settleServiceTypeCost) {
        this.settleServiceTypeCost = settleServiceTypeCost;
        return this;
    }

    public void setSettleServiceTypeCost(String settleServiceTypeCost) {
        this.settleServiceTypeCost = settleServiceTypeCost;
    }

    public String getSettleTrafficCost() {
        return settleTrafficCost;
    }

    public AzFinSettleBill settleTrafficCost(String settleTrafficCost) {
        this.settleTrafficCost = settleTrafficCost;
        return this;
    }

    public void setSettleTrafficCost(String settleTrafficCost) {
        this.settleTrafficCost = settleTrafficCost;
    }

    public String getSettleMeterialCost() {
        return settleMeterialCost;
    }

    public AzFinSettleBill settleMeterialCost(String settleMeterialCost) {
        this.settleMeterialCost = settleMeterialCost;
        return this;
    }

    public void setSettleMeterialCost(String settleMeterialCost) {
        this.settleMeterialCost = settleMeterialCost;
    }

    public String getSettleSubidyCost() {
        return settleSubidyCost;
    }

    public AzFinSettleBill settleSubidyCost(String settleSubidyCost) {
        this.settleSubidyCost = settleSubidyCost;
        return this;
    }

    public void setSettleSubidyCost(String settleSubidyCost) {
        this.settleSubidyCost = settleSubidyCost;
    }

    public String getSettleCompensatoryCost() {
        return settleCompensatoryCost;
    }

    public AzFinSettleBill settleCompensatoryCost(String settleCompensatoryCost) {
        this.settleCompensatoryCost = settleCompensatoryCost;
        return this;
    }

    public void setSettleCompensatoryCost(String settleCompensatoryCost) {
        this.settleCompensatoryCost = settleCompensatoryCost;
    }

    public String getSettleRewardCost() {
        return settleRewardCost;
    }

    public AzFinSettleBill settleRewardCost(String settleRewardCost) {
        this.settleRewardCost = settleRewardCost;
        return this;
    }

    public void setSettleRewardCost(String settleRewardCost) {
        this.settleRewardCost = settleRewardCost;
    }

    public String getSettleFeeTotalCost() {
        return settleFeeTotalCost;
    }

    public AzFinSettleBill settleFeeTotalCost(String settleFeeTotalCost) {
        this.settleFeeTotalCost = settleFeeTotalCost;
        return this;
    }

    public void setSettleFeeTotalCost(String settleFeeTotalCost) {
        this.settleFeeTotalCost = settleFeeTotalCost;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public AzFinSettleBill companyCode(String companyCode) {
        this.companyCode = companyCode;
        return this;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getLastLevel() {
        return lastLevel;
    }

    public AzFinSettleBill lastLevel(String lastLevel) {
        this.lastLevel = lastLevel;
        return this;
    }

    public void setLastLevel(String lastLevel) {
        this.lastLevel = lastLevel;
    }

    public String getLastLevelName() {
        return lastLevelName;
    }

    public AzFinSettleBill lastLevelName(String lastLevelName) {
        this.lastLevelName = lastLevelName;
        return this;
    }

    public void setLastLevelName(String lastLevelName) {
        this.lastLevelName = lastLevelName;
    }

    public String getRemark() {
        return remark;
    }

    public AzFinSettleBill remark(String remark) {
        this.remark = remark;
        return this;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Instant getGmtModified() {
        return gmtModified;
    }

    public AzFinSettleBill gmtModified(Instant gmtModified) {
        this.gmtModified = gmtModified;
        return this;
    }

    public void setGmtModified(Instant gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getModifiedUser() {
        return modifiedUser;
    }

    public AzFinSettleBill modifiedUser(String modifiedUser) {
        this.modifiedUser = modifiedUser;
        return this;
    }

    public void setModifiedUser(String modifiedUser) {
        this.modifiedUser = modifiedUser;
    }

    public Instant getGmtCreate() {
        return gmtCreate;
    }

    public AzFinSettleBill gmtCreate(Instant gmtCreate) {
        this.gmtCreate = gmtCreate;
        return this;
    }

    public void setGmtCreate(Instant gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public String getCreateUser() {
        return createUser;
    }

    public AzFinSettleBill createUser(String createUser) {
        this.createUser = createUser;
        return this;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getAdd1() {
        return add1;
    }

    public AzFinSettleBill add1(String add1) {
        this.add1 = add1;
        return this;
    }

    public void setAdd1(String add1) {
        this.add1 = add1;
    }

    public String getAdd2() {
        return add2;
    }

    public AzFinSettleBill add2(String add2) {
        this.add2 = add2;
        return this;
    }

    public void setAdd2(String add2) {
        this.add2 = add2;
    }

    public String getAdd3() {
        return add3;
    }

    public AzFinSettleBill add3(String add3) {
        this.add3 = add3;
        return this;
    }

    public void setAdd3(String add3) {
        this.add3 = add3;
    }

    public String getAdd4() {
        return add4;
    }

    public AzFinSettleBill add4(String add4) {
        this.add4 = add4;
        return this;
    }

    public void setAdd4(String add4) {
        this.add4 = add4;
    }

    public String getAdd5() {
        return add5;
    }

    public AzFinSettleBill add5(String add5) {
        this.add5 = add5;
        return this;
    }

    public void setAdd5(String add5) {
        this.add5 = add5;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AzFinSettleBill azFinSettleBill = (AzFinSettleBill) o;
        if (azFinSettleBill.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), azFinSettleBill.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "AzFinSettleBill{" +
            "id=" + getId() +
            ", settleId='" + getSettleId() + "'" +
            ", settleBatchId='" + getSettleBatchId() + "'" +
            ", orderCode='" + getOrderCode() + "'" +
            ", settleItem='" + getSettleItem() + "'" +
            ", tradeCode='" + getTradeCode() + "'" +
            ", settleObjectId='" + getSettleObjectId() + "'" +
            ", settleObjectTel='" + getSettleObjectTel() + "'" +
            ", carsTeamId='" + getCarsTeamId() + "'" +
            ", carsTeamName='" + getCarsTeamName() + "'" +
            ", productNo='" + getProductNo() + "'" +
            ", productName='" + getProductName() + "'" +
            ", productModelNo='" + getProductModelNo() + "'" +
            ", productModelName='" + getProductModelName() + "'" +
            ", productSerNo='" + getProductSerNo() + "'" +
            ", productSerDesc='" + getProductSerDesc() + "'" +
            ", sourceNameCode='" + getSourceNameCode() + "'" +
            ", sourceName='" + getSourceName() + "'" +
            ", haierCloseStatus='" + getHaierCloseStatus() + "'" +
            ", haierCloseTime='" + getHaierCloseTime() + "'" +
            ", serverCloseStatus='" + getServerCloseStatus() + "'" +
            ", serverCloseTime='" + getServerCloseTime() + "'" +
            ", settleOperateCost='" + getSettleOperateCost() + "'" +
            ", settleServiceTypeCost='" + getSettleServiceTypeCost() + "'" +
            ", settleTrafficCost='" + getSettleTrafficCost() + "'" +
            ", settleMeterialCost='" + getSettleMeterialCost() + "'" +
            ", settleSubidyCost='" + getSettleSubidyCost() + "'" +
            ", settleCompensatoryCost='" + getSettleCompensatoryCost() + "'" +
            ", settleRewardCost='" + getSettleRewardCost() + "'" +
            ", settleFeeTotalCost='" + getSettleFeeTotalCost() + "'" +
            ", companyCode='" + getCompanyCode() + "'" +
            ", lastLevel='" + getLastLevel() + "'" +
            ", lastLevelName='" + getLastLevelName() + "'" +
            ", remark='" + getRemark() + "'" +
            ", gmtModified='" + getGmtModified() + "'" +
            ", modifiedUser='" + getModifiedUser() + "'" +
            ", gmtCreate='" + getGmtCreate() + "'" +
            ", createUser='" + getCreateUser() + "'" +
            ", add1='" + getAdd1() + "'" +
            ", add2='" + getAdd2() + "'" +
            ", add3='" + getAdd3() + "'" +
            ", add4='" + getAdd4() + "'" +
            ", add5='" + getAdd5() + "'" +
            "}";
    }
}
